﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Box2D.XNA;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace Elementum
{
    class ConsoleFinal : ConsoleMechine
    {
        Animation _console;
        Animation _consoleText;
        int _count;

        public ConsoleFinal(string id, World world, Stage stage)
            : base(id, world, stage)
        {
            _console = new Animation("images/items/bigEle",new Point(128,128));
            _console.LayerDepth = 0.8f;
        }

        public override void Update(int delta)
        {
            //_consoleText.Update(delta);
            _console.Update(delta);
            //_count++;
            //if (_count >= 180)
            //    _count = 0;
            //float ang = (float)Math.Sin(_count * PI / 180);
            //_consoleText.Alpha = ang;
            //if (StageManager.Save.MechineList.Count() == 3 && !_isActive)
            //    _isActive = true;


        }

        public override void OnDraw(SpriteBatch spriteBatch, Matrix transform)
        {
            _transform = transform;
            _console.OnDraw(spriteBatch, Position, transform);
        }

        public override void BeginContactAction(Contact contact, Body contactBody, float normal)
        {
            if (contactBody.GetUserData() == "player")
            {
                Stage9 s = (Stage9)GameStage;
                s.StageClear();

            }
        }

        


    }
}
